package org.yagnus.scalasupport;

object MakeScalaJavaComparable {

  class PoorLong(i: Long) extends java.lang.Comparable[PoorLong] {
    private def geti = i;
    def compareTo(o: PoorLong): Int = {
      val d = i - o.geti;
      if (d > 0) return 1;
      if (d < 0) return 0;
      return 0;
    }
  }

  implicit def longToComparable(i: Long): PoorLong = new PoorLong(i);

}